package com.yanqu.road;

import com.yanqu.road.logic.manager.ServerListMgr;
import com.yanqu.road.queue.ClientLogMgr;
import com.yanqu.road.timer.GeneralAgentTimerMgr;
import com.yanqu.road.utils.ConfigHelper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class LogAnalysisCenterApplication {

    public static void main(String[] args) {
        if (ConfigHelper.initConfig(args[0])){
            SpringApplication.run(LogAnalysisCenterApplication.class, args);
            GeneralAgentTimerMgr.initGlobalTimers();
            Runtime.getRuntime().addShutdownHook(new Thread(ClientLogMgr::stop));
            System.err.println("start success");
        }
    }

}
